<template>
	<view>
		<view>
			<van-card v-for="(item,i) in stuList" :key="i" :title="item.name">
				<view slot="footer">
					<van-button size="mini" @click="look(item.id)">查看</van-button>
				</view>
			</van-card>
		</view>
	</view>
</template>

<script>
	// import uniNavBar from '../../components/uni-nav-bar/uni-nav-bar.vue'
	// import uniList from '../../components/uni-list/uni-list.vue'
	import search from "@/components/jm-search/jm-search.vue"
	import fjjCondition from '@/components/fjj-condition/fjj-condition.vue';
	export default {
		components: {
			// uniNavBar,
			// uniList
			search,
			fjjCondition
		},
		data() {
			return {
				stuList: [],
				color: '#4D7BFE',
				hasChoose: false,
				menuList: [{
						'title': '日期范围',
						'type': 'range',
						'key': 'time1',
					},
					{
						'title': '金额范围',
						'type': 'rangenumber',
						'key': 'count',
					}
				]
			}
		},
		created() {
			this.getData()
		},
		methods: {
			getData() {
				let teaId = 1
				// teaId = uni.getStorageSync('teaId');
				uni.request({
					url: 'http://localhost:8082/task_admin/student/list?pageNum=1&pageSize=100&teaId=' + teaId,
					success: (res) => {
						console.log(res)
						if (res.data.code == 200) {
							this.stuList = res.data.data
						}
					}
				})
			},
			// clickLeft() {
			// 	uni.navigateTo({
			// 		url: '/pages/teacher/index-tea'
			// 	});
			// },
			// clickRight() {
			// 	uni.navigateTo({
			// 		url: '/pages/teacher/publish-task'
			// 	});
			// },
			look(id) {
				uni.navigateTo({
					url: '/pages/teacher/stu-task-list-item?id=' + id
				});
			},
			//筛选返回值
			resultConditon(obj) {
				this.$refs.condition.visibleDrawer = false;
				this.hasChoose = obj.hasChoose;
				// console.log(obj);
			},
			orderbyChange(obj) {
				this.$refs.condition.visibleDrawer = true;
			}
		}
	}
</script>

<style>
</style>
